package com.leps.nq.sys.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.leps.nq.sys.entity.SysConfig;
import com.leps.nq.sys.mapper.SysConfigMapper;
import com.leps.nq.sys.service.ISysConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 参数配置表 服务实现类
 * </p>
 *
 * @author hex
 * @since 2022-05-20
 */
@Service
public class SysConfigServiceImpl extends ServiceImpl<SysConfigMapper, SysConfig> implements ISysConfigService {
    @Autowired
    SysConfigMapper configMapper;

    @Override
    public boolean checkConfigKeyUnique(String configKey) {
        SysConfig config = this.configMapper.checkConfigKeyUnique(configKey);
        return config == null;
    }

    public boolean removeByIds(Long[] configIds) {
        this.configMapper.deleteConfigByIds(configIds);
        return true;
    }
}
